
<html>
<head>
<title>SPL - Resultados da Consulta</title>
 <g:if test="${tipo == 'Admin'}">
        	<meta name="layout" content="adminBiblioteca" />
        </g:if>
        <g:else>
        	<meta name="layout" content="usuarioBiblioteca" />
        </g:else>
</head>
<body>

<div class="list">
	<div align="center">
	  <h1>Resultado da Consulta</h1>
                  <table>
                    <thead>     
                       	<tr>
                    		
                            <g:sortableColumn property="titulo" title="${message(code: 'relatorio.titulo.label', default: 'Titulo')}" params = "${params}"/>
                        
                            <g:sortableColumn property="autores" title="${message(code: 'relatorio.autor.label', default: 'Autor')}" params = "${params}"/>
                        
                            <g:sortableColumn property="ano" title="${message(code: 'relatorio.ano.label', default: 'Ano')}" params = "${params}"/>
                        
                            <g:sortableColumn property="editora" title="${message(code: 'relatorio.tipo.label', default: 'Editora')}" params = "${params}"/>
                            
                            <g:sortableColumn property="id" title="Detalhes" />
                        
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${pesquisaRelatorio}" status="i" var="relatorioTecnicoInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
							
			                <td>${fieldValue(bean: relatorioTecnicoInstance, field: "titulo")}</td>
                        
                            <td>${fieldValue(bean: relatorioTecnicoInstance, field: "autores")}</td>
                        
                            <td>${fieldValue(bean: relatorioTecnicoInstance, field: "ano")}</td>
                        
                            <td>${fieldValue(bean: relatorioTecnicoInstance, field: "tipo")}</td>
                            
 							<td class = "actionButtons">
                             
                             <span class = "actionButton">
                          
                            <g:link action="show" id="${relatorioTecnicoInstance.id}">
                              Ver mais
                            </g:link></span></td>
                        
                        </tr>
                    </g:each>
                     </tbody>
                      </table>
	</div>

        <div class="paginateButtons">
        <g:paginate total="${pesquisaRelatorio.count()}" />
        </div>

        <g:jasperReport action="createReportRelatorioSimple" controller="relatorioTecnico" format="PDF" jasper="Relatorio SPL - Relatorio Tecnico Simples" name="Relatorio SPL - PDF"/>
        <g:jasperReport action="createReportRelatorioSimple" controller="relatorioTecnico" format="XLS" jasper="Relatorio SPL - Relatorio Tecnico Simples" name="Relatorio SPL - XLS"/>
        <g:jasperReport action="createReportRelatorioSimple" controller="relatorioTecnico" format="ODT" jasper="Relatorio SPL - Relatorio Tecnico Simples" name="Relatorio SPL - ODT"/>
        <g:jasperReport action="createReportRelatorioSimple" controller="relatorioTecnico" format="DOCX" jasper="Relatorio SPL - Relatorio Tecnico Simples" name="Relatorio SPL - DOCX"/>

	<div align="center"><br></br><g:link action='search'>Pesquisar Novamente</g:link></div>
</body>
</html>